/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package net.tygzs.minerpg.Configuration.GuildConfig;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author thtTNT
 */
public class GuildInfo
{

    private String name;
    private List<String> members = new ArrayList<>();

    /**
     * @return the name
     */
    public String getName()
    {
        return name;
    }

    public List<String> getMembers()
    {
        return this.members;
    }

    public boolean hasPlayer(String name)
    {
        return this.members.contains(name);
    }

    public void addPlayer(String name)
    {
        this.members.add(name);
    }

    public boolean removePlayer(String name)
    {
        boolean isRemove = this.members.contains(name);
        this.members.remove(name);
        return isRemove;
    }

    public GuildInfo(String name, List<String> members)
    {
        this.name = name;
        this.members = members;
    }
}
